﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Contrast
{
    public partial class Form3 : Form
    {
        public Form3()
        {
            InitializeComponent();
        }

        private void Form3_Load(object sender, EventArgs e)
        {

        }

        private void button1_Click(object sender, EventArgs e)
        {
            string pass = XML.read("delpass", "p.xml");
            if (pass != "")
            {
                if (pass!=null &&pass != this.textBox2.Text)
                {
                    MessageBox.Show("密码错误");
                }
                else
                {
                    DialogResult = DialogResult.OK;
                }
            }
            else
            {
                if (this.textBox2.Text != "888888")
                {
                    MessageBox.Show("密码错误");
                }
                else
                {
                    DialogResult = DialogResult.OK;
                }
            }
        }

        private void button2_Click(object sender, EventArgs e)
        {
            DialogResult = DialogResult.Cancel;
        }
    }
}
